package com.igeek.javase.ch04.storage;

/*
 *@author wangpeng
 *2023/7/14 21:28
 *@description TODO
 */
public class Main {
    public static void main(String[] args) {
        Istorage s1 = new Light();
        Istorage s2 = new Mp3();
        Istorage s3 = new Disk();

        Computer cop1 = new Computer(s1);
        cop1.readData();
        cop1.writeData();
        System.out.println("#######################");
        Computer cop2 = new Computer(s2);
        cop2.readData();
        cop2.writeData();
        System.out.println("#######################");

        Computer cop3 = new Computer(s3);
        cop3.readData();
        cop3.writeData();
    }
}
